<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        function foo() {
            console.log('i am foo')
        }
        var a

        console.log(a)
       
        a=2

        // console.log(b)
        // let b = 3

        foo()

        
    </script>
</body>

</html>